package com.zhhs.jzcd.record.service.impl;

import java.util.List;
import com.zhhs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhhs.jzcd.record.mapper.BaseSendRecordMapper;
import com.zhhs.jzcd.record.domain.BaseSendRecord;
import com.zhhs.jzcd.record.service.IBaseSendRecordService;

/**
 * 精准营销发送记录Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-04
 */
@Service
public class BaseSendRecordServiceImpl implements IBaseSendRecordService
{
    @Autowired
    private BaseSendRecordMapper baseSendRecordMapper;

    /**
     * 查询精准营销发送记录
     *
     * @param id 精准营销发送记录主键
     * @return 精准营销发送记录
     */
    @Override
    public BaseSendRecord selectBaseSendRecordById(Long id)
    {
        return baseSendRecordMapper.selectBaseSendRecordById(id);
    }

    /**
     * 查询精准营销发送记录列表
     *
     * @param baseSendRecord 精准营销发送记录
     * @return 精准营销发送记录
     */
    @Override
    public List<BaseSendRecord> selectBaseSendRecordList(BaseSendRecord baseSendRecord)
    {
        return baseSendRecordMapper.selectBaseSendRecordList(baseSendRecord);
    }

    /**
     * 新增精准营销发送记录
     *
     * @param baseSendRecord 精准营销发送记录
     * @return 结果
     */
    @Override
    public int insertBaseSendRecord(BaseSendRecord baseSendRecord)
    {
        baseSendRecord.setCreateTime(DateUtils.getNowDate());
        return baseSendRecordMapper.insertBaseSendRecord(baseSendRecord);
    }

    /**
     * 修改精准营销发送记录
     *
     * @param baseSendRecord 精准营销发送记录
     * @return 结果
     */
    @Override
    public int updateBaseSendRecord(BaseSendRecord baseSendRecord)
    {
        baseSendRecord.setUpdateTime(DateUtils.getNowDate());
        return baseSendRecordMapper.updateBaseSendRecord(baseSendRecord);
    }

    /**
     * 批量删除精准营销发送记录
     *
     * @param ids 需要删除的精准营销发送记录主键
     * @return 结果
     */
    @Override
    public int deleteBaseSendRecordByIds(Long[] ids)
    {
        return baseSendRecordMapper.deleteBaseSendRecordByIds(ids);
    }

    /**
     * 删除精准营销发送记录信息
     *
     * @param id 精准营销发送记录主键
     * @return 结果
     */
    @Override
    public int deleteBaseSendRecordById(Long id)
    {
        return baseSendRecordMapper.deleteBaseSendRecordById(id);
    }
}
